﻿@using Microsoft.AspNetCore.Routing
@using Smartstore.Utilities

@{
    var attributes = new AttributeDictionary().Merge(ConvertUtility.ObjectToDictionary(ViewData["htmlAttributes"] ?? new object()));
    var invariant = GetMetadata<bool>("invariant");
}

<input type="number"
       asp-for="@Model"
       attrs="attributes"
       sm-decimals="@(GetMetadata<uint?>("decimals") ?? 0)"
       sm-postfix="@(GetMetadata<string>("postfix"))"
       placeholder="@(GetMetadata<string>("placeholder") ?? T("Common.Empty").Value)"
       min="@(GetMetadata<long?>("min"))"
       max="@(GetMetadata<long?>("max"))"
       step="@(GetMetadata<long?>("step") ?? 1)"
       attr-data-invariant='(invariant, "true")' />